import request from '../../utils/request'

export function tableData<T>(data: unknown) {
  return request<List<T>>({
    url: '/integrity/page',
    method: 'POST',
    data
  })
}

export function add<T>(data: unknown) {
  return request<T>({
    url: '/integrity/add',
    method: 'POST',
    data
  })
}

export function save<T>(data: unknown) {
  return request<T>({
    url: '/integrity/update',
    method: 'POST',
    data
  })
}

export function deleteData<T>(id: string) {
  return request<T>({
    url: '/integrity/' + id,
    method: 'DELETE'
  })
}
